using System;
using System.Text;
using System.Collections.Generic;
using System.Linq;
using Microsoft.VisualStudio.TestTools.UnitTesting;
using experitestClient;
namespace Experitest
{
    [TestClass]
    public class demo
    {
        private string host = "localhost";
        private int port = 8888;
        private string projectBaseDirectory = "C:\\Users\\oziransky\\workspace\\Demo\\project";
        protected Client client = null;
        
        [TestInitialize()]
        public void SetupTest()
        {
            client = new Client(host, port);
            client.SetProjectBaseDirectory( projectBaseDirectory);
            client.SetReporter("xml", "reports", "demo");
        }

        [TestMethod]
        public void Testdemo()
        {
            client.SetApplicationTitle("ios_app:iPod");
            client.Launch("com.experitest.ExperiBank/.LoginActivity", true, false);
            client.ElementSendText("default", "Username", 0, "company");
            client.ElementSendText("default", "Password", 0, "company");
            client.Click("default", "Login", 0, 1);
            client.Click("default", "Logout", 0, 1);
        }
        [TestCleanup()]
        public void TearDown()
        {
            client.GenerateReport();
        }
    }
}